<template>
  <div class="tsdetail">
    <!-- <div class="index_nav"   >
        <img class="m1" @click="go(-1)"  src="../assets/image/youu.png">
        <img class="m2" src="../assets/image/logos.png"/>
        <span>广东省新筛中心结果查询平台vv</span>
    </div> -->
    <div class="table">
      <table >
        <tr class="tr1" >
          <td class="t1" >项目名称</td>
            <td class="t2">结果</td>
            <td class="t3">单位</td>
            <td class="t4">参考值</td>
          </tr>
            <tr class="tr2" v-for="(item, index) of tsdata.clzp_items" :key="index" else >
              <td >{{item.item_name}}</td>
              <td >{{item.val}}</td>
              <td >{{item.dw}}</td>
              <td >{{item.ref_val}}</td>
              <!-- <td class='computed' :class="{active: item.result === '阳性' }">{{item.result}}</td> -->
            </tr>
            <!-- <div v-show="detail.items.length === 0" class="were">暂时查无结果...</div> -->

      </table>
    </div>
    <div class="result" >
      <span class="r_p1">报告评价:</span>
      <span class="r_p2" >{{tsdata.clzp_report_pj}}</span>
    </div>
  </div>
</template>

<script>
export default {
  props: ['tsdata'],
  data () {
    return {

    }
  },
  mounted () {
    // if (window.history && window.history.pushState) {
    //   history.pushState(null, null, document.URL)
    //   window.addEventListener('popstate', this.goBack, false)
    // }
    console.log(this.tsdata)
  },
  methods: {
    // goBack () {
      // this.$router.push('/detail')
    // }
  }
}
</script>

<style scoped lang='less'>
*{
  margin:0;
  padding:0
}
.tsdetail{
  position: relative;
  // top:0;
  .table{
    width:100%;
    // background: red;
    position: relative;
    // top:-1rem;
    // left:0;
    }
    .table table .tr1{
      width:100%;
      // width:7.5rem;
      height:.8rem;
      text-align: center;
      background-color: rgb(6, 189, 3);
    }
    .table table .tr1 td:nth-child(1){
      width:30%;
    }
    .table table .tr1 td:nth-child(2){
      width:15%;
    }
    .table table .tr1 td:nth-child(3){
      width:15%;
    }
    .table table .tr1 td:nth-child(4){
      width:20%;
    }
  .table table .tr2{
    width:100%;
    height:.6rem;
    text-align: center;
    background-color: #C6E8C6;
  }
  .result{
    width:100%;
    height:auto;
    position: relative;
    top:.5rem;

    .r_p1{
      width:20%;
      height:auto;
      position: relative;
      left:2%;
      float:left;
      color:black;
    }
    .r_p2{
      width:78%;
      height:auto;
      float:left;
      margin:0 0 .2rem 0;
    }
  }
}

</style>
